/*
 * Reader.cpp
 *
 *  Created on: Mar 23, 2012
 *      Author: s146913
 */

#include "Lezer.h"

Lezer::Lezer(int n, RWLock* rwlock) : Thread("Lezer") {
	rwl = rwlock; setName(n);
}

void Lezer::run() {
	while(true) {
		rwl->rdlock();

		cout << "lezer is aan het lezen." << endl;
		msleep(1000);

		rwl->unlock();
		msleep(1000);
	}
}
